﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BasketballAI.Infrastructure.GameItems;

namespace BasketballAI.Infrastructure
{
    public class Team
    {
        #region Members
        private String teamName;
        private int teamScore;
        private Global.TeamStatus teamStatus;
        private Player[] teamPlayers;
        private Basket targetBasket;
                
        #endregion

        #region Constructors
        public Team()
        { 
            
        }

        public Team(String Name,Player[] players)
        {
            this.teamName = Name;
            this.teamPlayers = players;
            this.teamScore = 0;
        }

        #endregion

        #region Properties

        public String TeamName
        {
          get { return teamName; }
          set { teamName = value; }
        }

        public int TeamScore
        {
          get { return teamScore; }
          set { teamScore = value; }
        }

        public Global.TeamStatus TeamStatus
        {
          get { return teamStatus; }
          set { teamStatus = value; }
        }

        public Player[] TeamPlayers
        {
          get { return teamPlayers; }
          set { teamPlayers = value; }
        }

        public Basket TargetBasket
        {
            get { return targetBasket; }
            set { targetBasket = value; }
        }

        #endregion

        #region Methods
        void ChangeTeamStatus()
        {
            if (teamStatus == Global.TeamStatus.Defence)
                teamStatus = Global.TeamStatus.Offence;
            else
                teamStatus = Global.TeamStatus.Defence;
        }
        #endregion
    }
}
